package xyz.cerberu.cet.subscription.domain;

import xyz.cerberu.cet.subtitle.domain.Subtitle;
import com.fasterxml.jackson.annotation.JsonIgnore;

import java.io.Serializable;

/**
 * @author  β世界
 * Created on 9:58
 * @Description 订阅者的实体类
 */
public class Subscription implements Serializable {

    private String user;
    /** 将uid和sub_id进行MD5加密**/
    private String subscription_id;
    private Subtitle subtitle;

    public Subscription() {
    }

    public Subscription(String user, String subscription_id, Subtitle subtitle) {
        this.user = user;
        this.subscription_id = subscription_id;
        this.subtitle = subtitle;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public void setSubscription_id(String subscription_id) {
        this.subscription_id = subscription_id;
    }

    public void setSubtitle(Subtitle subtitle) {
        this.subtitle = subtitle;
    }

    @JsonIgnore
    public String getUser() {
        return user;
    }

    public String getSubscription_id() {
        return subscription_id;
    }

    public Subtitle getSubtitle() {
        return subtitle;
    }

    @Override
    public String toString() {
        return "Subscription{" +
                "user='" + user + '\'' +
                ", subscriber_id='" + subscription_id + '\'' +
                ", subtitle=" + subtitle +
                '}';
    }
}
